<template>
  <div class="info">
      <p>{{title}}</p>
      <hr>
      <p v-if='introduce'>{{introduce}}</p>
      <p v-html="content"></p>
  </div>
</template>

<script>
import {getBanderDetailDate} from '@/utils/http.js'
export default {
    name:'GoodsInfo',
    props:['info'],
    data() {
        return {
            title:'', //标题
            introduce:'', //商品介绍
            img:'', //列标配图
            content:'' //内容
        }
    },
    created(){
        this.getContent()
    },
    methods:{
        getContent(){
            // 请求品牌详情
            getBanderDetailDate({id:this.info.brand_id}).then(res=>{
            this.title=this.info.name
            this.introduce=res.data.brand.simple_desc
            this.img=res.data.brand.list_pic_url
            this.content=this.info.goods_desc
        })
        }
    }


}
</script>

<style scope lang='less'>
.info{
    width: 100%;
}
p{
    width: 100%;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
    img{
        width: 100%;
    }
}

</style>